package site.assad.conf1;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import site.assad.conf.LogDao;
import site.assad.conf.UserDao;

/**
 * Author: Al-assad 余林颖
 * E-mail: yulinying_1994@outlook.com
 * Date: 2017/11/30 16:46
 * Description: 拆分方式配置：对2个dao类（UserDao，LogDao）进行bean标注的 JavaConfig类
 */
@Configuration
public class DaoConfig {

    @Bean  //或 @Bean(name="userDao") 显示标注 bean id
    public UserDao userDao(){
        return new UserDao();
    }

    @Bean
    public LogDao logDao(){
        return new LogDao();
    }

}
